package com.mdd.admin.service.order;

import com.alipay.api.AlipayApiException;
import com.mdd.admin.validate.order.*;
import com.mdd.admin.vo.order.OrderDetailVo;
import com.mdd.common.base.page.PageValidate;
import com.mdd.common.core.PageResult;
import com.mdd.common.entity.order.OrderInfo;
import com.mdd.common.entity.order.OrderList;
import com.mdd.system.vo.SystemAuthAdminInformVo;

/**
 * 订单服务接口类
 * @author LikeAdmin
 */
public interface IOrderInfoService  {

    /**
     * 订单列表
     *
     * @author LikeAdmin
     * @param pageValidate 分页参数
     * @param searchValidate 搜索参数
     * @return PageResult<OrderInfoListedVo>
     */
    PageResult<OrderList> list(PageValidate pageValidate, OrderInfoSearchValidate searchValidate, SystemAuthAdminInformVo systemAuthAdmin);

    /**
     * 订单详情
     *
     * @author LikeAdmin
     * @param id 主键ID
     * @return OrderInfoDetailVo
     */
    OrderDetailVo detail(Long id);

    /**
     * 订单新增
     *
     * @author LikeAdmin
     * @param createValidate 参数
     */
    void add(OrderInfoCreateValidate createValidate);


    /**
     * 订单编辑
     *
     * @author LikeAdmin
     * @param updateValidate 参数
     */
    void edit(OrderInfoUpdateValidate updateValidate);

    /**
     * 添加订单备注
     * @param orderId 订单编号
     * @param remark 备注
     */
   void addRemark(String orderId, String remark);
    /**
     * 确认订单
     * @param orderId 订单编号
     */
    void confirm(String orderId);

    /**
     * 万册订单
     * @param orderId
     */
    void finish(Long orderId) throws AlipayApiException;
    /**
     * 取消订单
     * @param orderId 订单编号
     */
    void cancel(Long orderId) throws AlipayApiException;
    /**
     * 订单删除
     *
     * @author LikeAdmin
     * @param orderId 订单编号
     */
    void del(Long orderId);

    /**
     * 订单更换车辆
     * @return
     */
    void changeCar(OrderBindCarValidate orderBindCarValidate);
    boolean isExist(Long orderId);
    /**
     * 根据订单编号获取订单信息
     */
    OrderInfo getOrderInfoById(Long orderId);
    void deliverVehicle(OrderDeliverVehicleValidate orderDeliverVehicleValidate);
    void returnVehicle(OrderDeliverVehicleValidate orderDeliverVehicleValidate);

    void tradeSuccess(String outOrderNo,String tradeNo);

}
